﻿using System;
using System.Linq;
using System.Linq.Expressions;
using System.Linq.Dynamic;using System.Text;
using System.Data;
using System.Data.Linq;
using System.Transactions;
using LinqToSqlExtensions;using System.ServiceModel;
using System.Collections;
using System.Collections.Generic;
using CardsServer.DAL;
using CardsServer.Tools;
namespace CardsServer.WCF
{
    public partial interface IService
    {
        [OperationContract]
        List<CRM_Contact> CRM_Contact_Get_ByClientID(Guid clientid, int ACID);


    }
    public partial class Service : IService
    {
        public List<CRM_Contact> CRM_Contact_Get_ByClientID(Guid clientid, int ACID)
        {
            using (CardsServer.DAL.DataClassesDataContext ctx = new CardsServer.DAL.DataClassesDataContext(getAccConnStr(ACID)))
            {
                return ctx.CRM_Contact.Where(p=>p.ClientID==clientid).ToList();
            }
        }

    }
}

